package com.scprovider.provider.controller;

import com.sccommon.common.api.UserAPI;
import com.sccommon.common.api.UserAPI2;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RestController;

import java.util.Collections;
import java.util.Map;

/**
 * 使用Feign进行远程服务调用。
 */
@RestController
public class UserFeignHystrixController implements UserAPI2 {
    @Value("${server.port}")
    private String port;

    @Override
    public String testHystrix() {
        System.out.println("准备睡2");
        int i = 1/0;
        System.out.println(port + " 好的 ====第：" + i + "次调用");
        return "port:" + port;
    }
}

